//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#ifndef NATIVE_DOMAIN_COMPILING_COMMON_STATUSSTACK_H
#define NATIVE_DOMAIN_COMPILING_COMMON_STATUSSTACK_H

#ifndef NATIVE_SYSTEM_BASE_OBJECT_H
#include "System/Base/Object.h"
#endif
#ifndef NATIVE_SYSTEM_BASE_TYPES_H
#include "System/Base/Types.h"
#endif

using namespace Native::System;

namespace Native { namespace Compiling
{
    NATIVE_DECLARE_CONST_OBJECT(CStatusStack, C_STATUS_STACK);
    class NATIVE_LIBRARY_EXPORT CStatusStack :
        public CObject
    {
    protected:
        vector<int32_t> _status;

    public:
        CStatusStack();
        CStatusStack(C_STATUS_STACK& that);
        CStatusStack(C_STATUS_STACK&& that);
        virtual ~CStatusStack();

    public:
        void Push(int32_t status);
        int32_t Pop();
        bool Empty();
        void Clear();

        C_STATUS_STACK& operator=(C_STATUS_STACK& rvalue);
    };
}}

#endif